package com.chb.docter.controller;

import com.chb.docter.service.PatientService;
import com.hos.entity.his.Patient;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: 陈海彬
 * @date: Created in 2023/12/19 11:27
 * @description:
 * @modified By:
 * @version:
 */
@RestController
@RequestMapping("/docter/patient")
public class PatientController {


    @Resource
    private PatientService patientService;

    /**
     * 根据手机号查询是否有该用户
     *
     * @param phone 手机号码
     */
    @GetMapping("/selectPatientByPhone/{phone}")
    Patient selectPatientByPhone(@PathVariable String phone) {
        return patientService.selectPatientByPhone(phone);
    }
}